import request from '../../router/axios'

export const getSysSchedule = (userIdList, endDate, startDate) => request({ // 查询开始日期到结束日期内查询用户的所有日程
  url: '/admin/sysschedule/getSchedule?endDate=' + endDate + '&startDate=' + startDate,
  method: 'post',
  data: userIdList
})

export const getAffairtodo = () => request({ // 获取待办事务
  url: '/admin/workbench/affairtodo',
  method: 'get'
})

export const getNotification = () => request({ // 获取消息通知
  url: '/admin/workbench/notification',
  method: 'get'
})

export const getQuickentry = () => request({ // 取快捷入口
  url: '/admin/workbench/quickentry',
  method: 'get'
})

export const getReviewtodo = () => request({ // 获取待办审批
  url: '/admin/workbench/reviewtodo',
  method: 'get'
})

export const getTasktodo = () => request({ // 获取待办任务
  url: '/admin/workbench/tasktodo',
  method: 'get'
})

export const getWorksum = () => request({ // 获取今日工作总计
  url: '/admin/workbench/worksum',
  method: 'get'
})

export const saveWB = data => request({ // 保存工作台
  url: '/admin/workbench/layout/save',
  method: 'post',
  data
})

export const getAllWB = () => request({ // 获取所有工作台
  url: '/admin/workbench/layout/list/all',
  method: 'get'
})

export const getWB = () => request({ // 获取我的工作台
  url: '/admin/workbench/layout/list/mine',
  method: 'get'
})

export const saveHeight = params => request({ // 保存区块高度值
  url: '/admin/workbench/layout/height/save',
  method: 'post',
  params
})

export const getHasauth = () => request({ // 获取用户有访问权限的所有末级菜单
  url: '/admin/menu/hasauth',
  method: 'get'
})

export const saveQuickentry = data => request({ // 保存用户设置的快捷入口
  url: '/admin/workbench/quickentry/save',
  method: 'post',
  data
})
